Fix surround operations on selections ending at EOF - #16175
Open
Boulea7 wants to merge 1 commit into
Open
Conversation
Boulea7
marked this pull request as ready for review
August 12, 2026 08:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #14923
Testing
cargo test -p helix-core surround::test::test_get_surround_pos_full_range_ending_at_eof_can_be_deleted -- --exact --nocapturefailed withRangeExceedsTextbefore the fixcargo test -p helix-core surround::test(11 passed)cargo test -p helix-core(171 unit tests, 4 integration tests, and 5 doc tests passed; 3 doc tests ignored)HELIX_DISABLE_AUTO_GRAMMAR_BUILD=1 cargo test --workspacecargo fmt --all --checkHELIX_DISABLE_AUTO_GRAMMAR_BUILD=1 cargo checkHELIX_DISABLE_AUTO_GRAMMAR_BUILD=1 cargo clippy --workspace --all-targets -- -D warningsgit diff --checkThe Rust and Ruby tree-sitter grammars were fetched and built locally because the full
helix-coresyntax tests require them.HELIX_DISABLE_AUTO_GRAMMAR_BUILD=1only disabled the expensive automatic fetch/build of all runtime grammars for the workspace commands; it did not skip Rust crates or tests. A defaultcargo checkattempt was stopped after the generatedgitcommitparser had been compiling at-O3for over eight minutes; the command then passed with the automatic grammar build disabled.